﻿package com.starz.games.scenes {
	import com.eaglesandcobras.games.scenes.*;
	
	public class GameOverlay extends OverlayPage{

		public function GameOverlay() {
			super();
		}
		
		override public function init():void {
			soundController(content.soundBtn, content.soundBtn.soundOn, content.soundBtn.soundOff);
			addScoreUpdate ( updateGameScore );
			addTimeUpdate ( updateTimeLeft );
			addCopyUpdate ( updateFooterCopy );
		}
		
		public function updateGameScore():void {
			content.total.text = String ( score );
		}
		
		public function updateTimeLeft():void {
			content.timeLeft.text = String ( time );
		}
		
		public function updateFooterCopy($string:String, $type:String):void {
			if ($type=="footer") content.footerText.text = $string;
		}
	}
	
}
